import { View } from '@tarojs/components'
import s from './index.modules.scss'

import classnames from 'classnames'

interface TagProps {
  type?: string,
  text: string
}

export default function Tag(props: TagProps) {
  const {type = 'normal', text} = props

  const _style = classnames(s.container, {
    [s.new]: type === 'new'
  })
  return (
    <View className={_style}>{text}</View>
  )
}